set(AMQPCPP_DIR ${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP)

set(SRCS
        ${AMQPCPP_DIR}/src/array.cpp
        ${AMQPCPP_DIR}/src/channel.cpp
        ${AMQPCPP_DIR}/src/channelimpl.cpp
        ${AMQPCPP_DIR}/src/connectionimpl.cpp
        ${AMQPCPP_DIR}/src/deferredcancel.cpp
        ${AMQPCPP_DIR}/src/deferredconfirm.cpp
        ${AMQPCPP_DIR}/src/deferredconsumer.cpp
        ${AMQPCPP_DIR}/src/deferredextreceiver.cpp
        ${AMQPCPP_DIR}/src/deferredget.cpp
        ${AMQPCPP_DIR}/src/deferredpublisher.cpp
        ${AMQPCPP_DIR}/src/deferredreceiver.cpp
        ${AMQPCPP_DIR}/src/field.cpp
        ${AMQPCPP_DIR}/src/flags.cpp
        ${AMQPCPP_DIR}/src/receivedframe.cpp
        ${AMQPCPP_DIR}/src/table.cpp
        ${AMQPCPP_DIR}/src/watchable.cpp

        ${AMQPCPP_DIR}/src/basicackframe.h
        ${AMQPCPP_DIR}/src/basiccancelframe.h
        ${AMQPCPP_DIR}/src/basiccancelokframe.h
        ${AMQPCPP_DIR}/src/basicconsumeframe.h
        ${AMQPCPP_DIR}/src/basicconsumeokframe.h
        ${AMQPCPP_DIR}/src/basicdeliverframe.h
        ${AMQPCPP_DIR}/src/basicframe.h
        ${AMQPCPP_DIR}/src/basicgetemptyframe.h
        ${AMQPCPP_DIR}/src/basicgetframe.h
        ${AMQPCPP_DIR}/src/basicgetokframe.h
        ${AMQPCPP_DIR}/src/basicheaderframe.h
        ${AMQPCPP_DIR}/src/basicnackframe.h
        ${AMQPCPP_DIR}/src/basicpublishframe.h
        ${AMQPCPP_DIR}/src/basicqosframe.h
        ${AMQPCPP_DIR}/src/basicqosokframe.h
        ${AMQPCPP_DIR}/src/basicrecoverasyncframe.h
        ${AMQPCPP_DIR}/src/basicrecoverframe.h
        ${AMQPCPP_DIR}/src/basicrecoverokframe.h
        ${AMQPCPP_DIR}/src/basicrejectframe.h
        ${AMQPCPP_DIR}/src/basicreturnframe.h
        ${AMQPCPP_DIR}/src/bodyframe.h
        ${AMQPCPP_DIR}/src/channelcloseframe.h
        ${AMQPCPP_DIR}/src/channelcloseokframe.h
        ${AMQPCPP_DIR}/src/channelflowframe.h
        ${AMQPCPP_DIR}/src/channelflowokframe.h
        ${AMQPCPP_DIR}/src/channelframe.h
        ${AMQPCPP_DIR}/src/channelopenframe.h
        ${AMQPCPP_DIR}/src/channelopenokframe.h
        ${AMQPCPP_DIR}/src/confirmframe.h
        ${AMQPCPP_DIR}/src/confirmselectframe.h
        ${AMQPCPP_DIR}/src/confirmselectokframe.h
        ${AMQPCPP_DIR}/src/connectioncloseframe.h
        ${AMQPCPP_DIR}/src/connectioncloseokframe.h
        ${AMQPCPP_DIR}/src/connectionframe.h
        ${AMQPCPP_DIR}/src/connectionopenframe.h
        ${AMQPCPP_DIR}/src/connectionopenokframe.h
        ${AMQPCPP_DIR}/src/connectionsecureframe.h
        ${AMQPCPP_DIR}/src/connectionsecureokframe.h
        ${AMQPCPP_DIR}/src/connectionstartframe.h
        ${AMQPCPP_DIR}/src/connectionstartokframe.h
        ${AMQPCPP_DIR}/src/connectiontuneframe.h
        ${AMQPCPP_DIR}/src/connectiontuneokframe.h
        ${AMQPCPP_DIR}/src/consumedmessage.h
        ${AMQPCPP_DIR}/src/exchangebindframe.h
        ${AMQPCPP_DIR}/src/exchangebindokframe.h
        ${AMQPCPP_DIR}/src/exchangedeclareframe.h
        ${AMQPCPP_DIR}/src/exchangedeclareokframe.h
        ${AMQPCPP_DIR}/src/exchangedeleteframe.h
        ${AMQPCPP_DIR}/src/exchangedeleteokframe.h
        ${AMQPCPP_DIR}/src/exchangeframe.h
        ${AMQPCPP_DIR}/src/exchangeunbindframe.h
        ${AMQPCPP_DIR}/src/exchangeunbindokframe.h
        ${AMQPCPP_DIR}/src/extframe.h
        ${AMQPCPP_DIR}/src/framecheck.h
        ${AMQPCPP_DIR}/src/headerframe.h
        ${AMQPCPP_DIR}/src/heartbeatframe.h
        ${AMQPCPP_DIR}/src/includes.h
        ${AMQPCPP_DIR}/src/methodframe.h
        ${AMQPCPP_DIR}/src/passthroughbuffer.h
        ${AMQPCPP_DIR}/src/protocolheaderframe.h
        ${AMQPCPP_DIR}/src/queuebindframe.h
        ${AMQPCPP_DIR}/src/queuebindokframe.h
        ${AMQPCPP_DIR}/src/queuedeclareframe.h
        ${AMQPCPP_DIR}/src/queuedeclareokframe.h
        ${AMQPCPP_DIR}/src/queuedeleteframe.h
        ${AMQPCPP_DIR}/src/queuedeleteokframe.h
        ${AMQPCPP_DIR}/src/queueframe.h
        ${AMQPCPP_DIR}/src/queuepurgeframe.h
        ${AMQPCPP_DIR}/src/queuepurgeokframe.h
        ${AMQPCPP_DIR}/src/queueunbindframe.h
        ${AMQPCPP_DIR}/src/queueunbindokframe.h
        ${AMQPCPP_DIR}/src/reducedbuffer.h
        ${AMQPCPP_DIR}/src/returnedmessage.h
        ${AMQPCPP_DIR}/src/returnedmessage.h
        ${AMQPCPP_DIR}/src/transactioncommitframe.h
        ${AMQPCPP_DIR}/src/transactioncommitokframe.h
        ${AMQPCPP_DIR}/src/transactionframe.h
        ${AMQPCPP_DIR}/src/transactionrollbackframe.h
        ${AMQPCPP_DIR}/src/transactionrollbackokframe.h
        ${AMQPCPP_DIR}/src/transactionselectframe.h
        ${AMQPCPP_DIR}/src/transactionselectokframe.h
        )


add_library(AMQP-CPP ${SRCS})

target_include_directories(AMQP-CPP PRIVATE ${AMQPCPP_DIR}/include/amqpcpp)
target_include_directories(AMQP-CPP PRIVATE ${Boost_INCLUDE_DIRS})
target_include_directories(AMQP-CPP SYSTEM PUBLIC ${AMQPCPP_DIR}/include)
